unexport SRC
SRC := $(wildcard *.cpp)
unexport HEAD_FILE
HEAD_FILE := $(wildcard *.h)
unexport OBJ
OBJ := $(patsubst %.cpp,%.o,$(SRC))

all:main
main:$(OBJ)
	g++ -o $@ $^
%.o:%.cpp $(HEAD_FILE)
	g++ -c $<

.PHONY:clean
clean:
	rm -rf *.o main
